﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MapEntities;
using ServerPlatform.Web;

namespace WebApp.Controls
{
    public partial class SymbolBehaviourEditor : BaseDataEditor<SymbolItemBehavior>
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected override void OnInit(EventArgs e)
        {
            LayerItemBehaviourEditor1.CreateInstance += new BaseDataEditor<LayerItemBehaviour>.OnCreateInstance(LayerItemBehaviourEditor1_CreateInstance);
            base.OnInit(e);
        }

        LayerItemBehaviour LayerItemBehaviourEditor1_CreateInstance()
        {
            return new SymbolItemBehavior();
        }

        protected override void ShowEntity(SymbolItemBehavior entity)
        {
            LayerItemBehaviourEditor1.Edit(entity as SymbolItemBehavior);
        }

        public override SymbolItemBehavior GetEntity()
        {
            Current = LayerItemBehaviourEditor1.EndEdit() as SymbolItemBehavior;
            return Current;
        }
    }
}